home *** CD-ROM | disk | FTP | other *** search
/ Openstep 4.2 (Developer) / Openstep Developer 4.2.iso / NextLibrary / Frameworks / NEXTIME.framework / Versions / A / Headers / NTTrack.h < prev    next >
Encoding:
Text File  |  1995-08-30  |  4.3 KB  |  157 lines

  1. /*
  2.  *    NTTrack.h
  3.  *     Copyright 1993, NeXT Computer, Inc.
  4.  *    
  5.  *    01Mar93 mpaque Created.
  6.  *    06Jan94    mpaque    Revised and merged with protocol defs.
  7.  */
  8. #import <Foundation/NSObject.h>
  9. #import <Foundation/NSArray.h>
  10. #import <Foundation/NSData.h>
  11. #import <Foundation/NSDate.h>
  12. #import <Foundation/NSDictionary.h>
  13. #import "NTSampleBuffer.h"
  14. #import "movies.h"
  15. #import "status.h"
  16. #import "NTMedia.h"
  17. #import "NTClock.h"
  18.  
  19. /*
  20.  * A protocol for messaging a track.  The track is composed of a media
  21.  * and supplementary information. 
  22.  *
  23.  */
  24. @protocol NTTrack <NSObject>
  25. - (void)setUsage:(NTUsage) use;
  26. - (NTUsage) usage;
  27. - (void) setStatus:(NTStatusCode)value;
  28. - (NTStatusCode) status;
  29. - (void)setTrackID:(int)id;
  30. - (int)trackID;
  31. - (void)setEnabled:(BOOL)flag;
  32. - (BOOL)isEnabled;
  33. - (void)setMedia:(id <NTMedia>)media;
  34. - (id <NTMedia>)media;
  35. - (void)setMovie:(id)mov;
  36. - (id)movie;
  37. - (void)setLayer:(int)layer;
  38. - (int) layer;
  39. - (void) setMatrix:(NTMatrix)newMatrix;
  40. - (void) getMatrix:(out NTMatrix *)matrixp;
  41. - (void)setSize:(NSSize)newSize;
  42. - (NSSize)size;
  43. - (void) setVolume:(double) volume;
  44. - (double) volume;
  45. - (BOOL)setLanguage:(NSString *)language;
  46. - (NSString *)language;
  47. - (void)setDuration:(double)duration;
  48. - (double)duration;
  49. - (void)setOffset:(double) offset;
  50. - (double)offset;
  51. - (void)convertToMediaTime:(inout double *) time;
  52. - (void)convertFromMediaTime:(inout double *) time;
  53. - (void)addAlternate:(id <NTTrack>)alt;
  54. - (void)removeAlternate:(id <NTTrack>)alt;
  55. - (NSMutableArray *)alternateList;
  56. - (int)dataSizeForTime:(double)time duration:(double)duration;
  57. - (int)sampleCount;
  58. - (void)setCreationDate:(NSDate *)date;
  59. - (NSDate *)creationDate;
  60. - (void)setModificationDate:(NSDate *)date;
  61. - (NSDate *)modificationDate;
  62. - (BOOL) hasNonSyncSamples;
  63. - (bycopy NSDictionary *)userData;
  64. - (void)setUserData:(bycopy NSDictionary *)data;
  65.  
  66. - (BOOL)getNextInterestingTime: (NTInterestingTimeFlags) flags
  67.         startingFrom        :    (double)startTime
  68.         inDirection        :    (NTTimeDirection)direction
  69.         interestingTime        :    (out double *)itimep
  70.         duration        :    (out double *) durationp;
  71.  
  72. - (bycopy NTSampleBuffer *)sampleAtTime:(double)time;
  73. - (bycopy NTSampleBuffer *)sampleAtTime:(double)time
  74.         withMaxDuration    :(double)duration;
  75. - (BOOL)getSampleReference    :    (out int *)offset
  76.         maxLength        :    (inout int *)len
  77.         durationPerSample    :    (out double *)duration
  78.         sampleDescription    :    (bycopy out NSDictionary**)description
  79.         maxSampleCount    :    (int *)nsamples
  80.         sampleFlags        :    (out NTSampleFlags *)flags
  81.         atTime        :    (double)time;
  82.  
  83. - (BOOL) insertSegmentFrom:    (id <NTTrack>)srcTrack
  84.             fromTime    :    (double)srcTime
  85.             duration    :    (double)duration
  86.             toTime        :    (double)dstTime;
  87. - (BOOL) insertEmptySegmentAtTime:(double)time andDuration:(double)duration;
  88. - (BOOL) deleteSegmentFromTime:    (double)trackTime
  89.             duration    :    (double)dur;
  90. - (BOOL) insertMediaFromTime:    (double)mediaTime
  91.             duration    :    (double)mediaDuration
  92.             toTime        :    (double)trackTime;
  93. - (BOOL) adjustSegmentScale    :    (double)trackTime
  94.             oldDuration        :    (double)oldDur
  95.             newDuration        :    (double)newDur;
  96. - (void)getScale:(out double *)scale atTime:(double)time;
  97. - (void) copySettingsFrom:(id <NTTrack>)otherTrack;
  98. - newEditState;
  99. - (BOOL)setEditState: (id)state;
  100.  
  101. /*
  102.  * Edit List API, used between the file I/O module and the track.
  103.  * These methods are not intended for general use.  Invoking these methods
  104.  * outside of archiving or unarchiving operations may result in fatal errors
  105.  * and possible loss of data.
  106.  */
  107. - (void)clearEditList;        // Destroy the current edit list
  108. /*
  109.  * The following methods are used when archiving a movie to a file.
  110.  * They may also be handy when initializing editing GUI. These are safe to
  111.  * call at any time.
  112.  */
  113. - (int)currentEditCount;    // Number of edits currently in list
  114. - (BOOL)getEditAtIndex    :    (int)index
  115.     duration    :    (out double *)durp
  116.     atMediaTime    :    (out double *)mTimep
  117.     rate        :    (out double *)mRatep;
  118.  
  119. @end
  120.  
  121.  
  122. /*
  123.  * A class for representing a track.  The track is composed of a media
  124.  * and supplementary information. 
  125.  *
  126.  */
  127. @interface NTTrack: NSObject <NTTrack>
  128. {
  129. @private
  130.     BOOL        isEnabled;
  131.     
  132.     int        layer;
  133.     int        trackID;
  134.     int        saveCnt;
  135.     NTUsage        usage;
  136.     NTStatusCode    status;
  137.     NSString *    language;
  138.     NSDate *    creationDate;
  139.     NSDate *    modificationDate;
  140.     NSZone *    hotZone;
  141.     
  142.     void        *editList;
  143.  
  144.     id        movie;
  145.     id <NTMedia>    media;
  146.     id        alternate;
  147.     NSDictionary    *userData;
  148.  
  149.     NSSize        size;
  150.     double        volume;
  151.     NTMatrix    matrix;
  152. }
  153. - init;
  154. - (void)dealloc;
  155. @end
  156.  
  157.